package com.rmondjone.androidcamerademo

import com.ant.http.Bean.HttpResult
import com.ant.http.HttpService
import com.rmondjone.androidcamerademo.bean.FaceBean
import com.rmondjone.androidcamerademo.bean.FaceConsultBean
import com.rmondjone.androidcamerademo.bean.HomeBean
import okhttp3.MultipartBody
import retrofit2.Call
import retrofit2.http.*


interface CommonService : HttpService {
    @Multipart
    @POST("api/common/uploadimg")
    fun upFile(@Part part: MultipartBody.Part):
            Call<HttpResult<FileBean>>

    @FormUrlEncoded
    @POST("api/acupoint/seeinfo")
    fun seeinfo(@Field("images") images: String, @Field("type") type: Int = 7):
            Call<HttpResult<FaceBean>>

    @FormUrlEncoded
    @POST("api/acupoint/face")
    fun acupoint(@Field("image") images: String):
            Call<HttpResult<FaceConsultBean>>

    @FormUrlEncoded
    @POST("api/acupoint/tongue")
    fun tongue(@Field("image") images: String):
            Call<HttpResult<FaceConsultBean>>

    //    @FormUrlEncoded
    @POST("api/acupoint/seetype/")
    fun seetype():
            Call<HttpResult<List<TypeBean>>>

    @GET("api/acupoint/home/")
    fun home(): Call<HttpResult<List<HomeBean>>>

}